import request from '@/utils/request'

// 每一条数据
export const blogList = () => {
  return request.get('/blogList')
}

// 详情数据
export const blogOne = (id: string) => {
  return request.get('/blogOne', { params: { id } })
}

// 增加
export const blogAdd = (content: string, tags: string, title: string) => {
  return request({
    url: '/blogAdd',
    method: 'POST',
    data: {
      content,
      tags,
      title,
    },
  })
}

// 删除
export const blogdel = (params) => request.delete('/blogdel', { params })

// 修改
export const bloged = (data) => request.put('/bloged', { data })

// 查询
export const blogcha = (params) => request.get('/blogcha', { params })
